#include <iostream>
#include <vector>
#include "get_jack_and_jill_data.h"

using namespace std;
int main()
{
    int jack_count = 0;
    double *jack_data = get_from_jack(&jack_count);
    vector<double> *jill_data = get_from_jill();
    double h = -1;
    double *high_jack;
    double *high_jill;
    for (int i = 0; i < jack_count; i++)
    {
        if (h < jack_data[i])
        {
            high_jack = &jack_data[i];
            h = jack_data[i];
        }
    }
    h = -1;
    for (int i = 0; i < jill_data->size(); i++)
    {
        if (h < (*jill_data)[i])
        {
            h = (*jill_data)[i];
            high_jill = &(*jill_data)[i];
        }
    }
    cout << "Jill's max: " << *high_jill
         << "; Jack's max: " << *high_jack;

    delete[] jack_data;
    delete jill_data;
    return 0;
}